import React, { Component } from 'react';
import { HashRouter as Router, Link, Route, Switch, Redirect } from "react-router-dom";

import Home from './pages/home';
import CitySelect from './pages/citySelect';
import MaoFound from './pages/maoFound';

class App extends Component {
  render() {
    return (
      <div>
        <Router>
          {/* <nav>
            <Link to="/">123</Link>
            <Link to="/home">home</Link>
            <Link to="/citySelect">城市找房</Link>
            <Link to="/maoFound">地图找房</Link>
          </nav>
          <section> */}
          <Switch>
            <Route exact path="/"><Redirect to="/home"></Redirect></Route>
            <Route path="/home" component={Home}></Route>
            <Route path="/citySelect" component={CitySelect}></Route>
            <Route path="/maoFound" component={MaoFound}></Route>
          </Switch>
          {/* </section> */}
        </Router>
      </div>
    );
  }
}
export default App;